package team.zero.lemon.module.workflow.service;

import org.springframework.stereotype.Service;
import team.zero.lemon.common.exception.CustomException;
import team.zero.lemon.common.service.CrudService;
import team.zero.lemon.module.workflow.dao.IRuleDao;
import team.zero.lemon.module.workflow.entity.Parameter.Participants;
import team.zero.lemon.module.workflow.entity.Rule;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by bolin on 2016/11/17.
 */
@Service
public class RuleService extends CrudService<IRuleDao, Rule> {

    public List<Rule> findRuleByFromActivityIdRuleType(Integer activityId,Integer ruleType ) {
        try {
            return dao.findRuleByFromActivityIdRuleType(activityId,ruleType);
        } catch (Exception exc) {
            throw new CustomException(exc);
        }
    }
}
